package com.geek.event;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(EventConfig.class)){
            DemoPublisher demoPublisher = context.getBean(DemoPublisher.class);
            demoPublisher.publish("Hello spring boot");
        }
    }
}
